define({ "api": [
  {
    "type": "post",
    "url": "/webim/friendship/add",
    "title": "添加好友",
    "name": "AddFriend",
    "group": "FriendShip",
    "version": "0.1.0",
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "String",
            "optional": false,
            "field": "friendId",
            "description": "<p>好友ID</p>"
          }
        ]
      }
    },
    "success": {
      "examples": [
        {
          "title": "成功响应:",
          "content": "HTTP/1.1 200 OK\n{\n   \"code\": 200\n }",
          "type": "json"
        }
      ]
    },
    "filename": "routes/friendship.js",
    "groupTitle": "FriendShip"
  },
  {
    "type": "get",
    "url": "/webim/friendship/all",
    "title": "获取当前登录用户的所有好友列表",
    "name": "GetAllFriends",
    "group": "FriendShip",
    "version": "0.1.0",
    "success": {
      "examples": [
        {
          "title": "成功响应:",
          "content": "HTTP/1.1 200 OK\n{\n  \"code\": 200,\n  \"result\": [\n    {\n      \"displayName\": \"\",\n      \"message\": \"系统添加\",\n      \"status\": 20,\n      \"updatedAt\": \"2016-09-12T02:14:04.000Z\",\n      \"user\": {\n        \"id\": \"6K3EdJh9C\",\n        \"uid\": \"zhangdc\",\n        \"nickname\": \"张德聪\",\n        \"contactNumber\": \"18688780069\",\n        \"storeName\": \"开思\",\n        \"storeId\": \"SUPER007\",\n        \"partyGroup\": \"张德聪\",\n        \"portraitUri\": \"\"\n      }\n    },\n    {\n      \"displayName\": \"\",\n      \"message\": \"系统添加\",\n      \"status\": 20,\n      \"updatedAt\": \"2016-09-13T07:45:04.000Z\",\n      \"user\": {\n        \"id\": \"yLaqAmlHi\",\n        \"uid\": \"kswz\",\n        \"nickname\": \"王志\",\n        \"contactNumber\": \"18688780069\",\n        \"storeName\": \"开思\",\n        \"storeId\": \"SUPER007\",\n        \"partyGroup\": \"王志\",\n        \"portraitUri\": \"\"\n      }\n    },\n    ...\n  ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "routes/friendship.js",
    "groupTitle": "FriendShip"
  },
  {
    "type": "get",
    "url": "/webim/message/history",
    "title": "查询聊天记录",
    "name": "GetUser",
    "group": "IMMessage",
    "version": "0.1.0",
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "String",
            "optional": false,
            "field": "target",
            "description": "<p>指定目标用户</p>"
          },
          {
            "group": "Parameter",
            "type": "Number",
            "optional": false,
            "field": "before",
            "description": "<p>在该时间戳之前的聊天记录</p>"
          }
        ]
      }
    },
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "Object[]",
            "optional": false,
            "field": "messages",
            "description": "<p>返回和指定用户在指定时间之前的聊天记录</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "成功响应:",
          "content": "HTTP/1.1 200 OK\n {\n   \"code\": 200,\n   \"result\": [\n     {\n       \"_id\": \"57df3ee7c352877011c7e916\",\n       \"channelType\": \"PERSON\",\n       \"fromUserId\": \"K69DpFSlN\",\n       \"toUserId\": \"ZXEkcNQOm\",\n       \"msgTimestamp\": 1474248423003,\n       \"timestamp\": 1474248423003,\n       \"objectName\": \"RC:TxtMsg\",\n       \"content\": {\n         \"content\": \"发嘎嘎\\n\",\n         \"extra\": \"普通消息\"\n       },\n       \"msgUID\": \"5BK0-3DMB-C79R-5EV0\",\n       \"encodedFromUserId\": \"K69DpFSlN\",\n       \"encodedToUserId\": \"ZXEkcNQOm\",\n       \"__v\": 0\n     },\n     {\n       \"_id\": \"57de09cbc352877011c7e913\",\n       \"channelType\": \"PERSON\",\n       \"fromUserId\": \"K69DpFSlN\",\n       \"toUserId\": \"ZXEkcNQOm\",\n       \"msgTimestamp\": 1474169291724,\n       \"timestamp\": 1474169291724,\n       \"objectName\": \"RC:TxtMsg\",\n       \"content\": {\n         \"content\": \"发\\n\",\n         \"extra\": \"普通消息\"\n       }\n     },\n     ...\n   ]\n }",
          "type": "json"
        }
      ]
    },
    "examples": [
      {
        "title": "示例：",
        "content": "GET /webim/message/history?target=K69DpFSlN",
        "type": "bash"
      }
    ],
    "filename": "routes/message.js",
    "groupTitle": "IMMessage"
  },
  {
    "type": "get",
    "url": "/webim/misc/oss_signature",
    "title": "获取OSS签名信息",
    "description": "<p>Web端上传文件参考<a href=\"https://help.aliyun.com/document_detail/31927.html\">Web端直传实践</a></p>",
    "name": "GetOssSignature",
    "group": "Misc",
    "version": "0.1.0",
    "success": {
      "examples": [
        {
          "title": "成功响应:",
          "content": "HTTP/1.1 200 OK\n{\n  \"accessKeyId\": \"MLaPoaRe9VOUqQgh\",\n  \"url\": \"http://impic.oss-cn-shenzhen.aliyuncs.com\",\n  \"policy\": \"eyJleHBpcmF0aW9uIjoiMjAxNi0wOS0yMlQwMzowMjowMS40ODBaIiwiY29uZGl0aW9ucyI6W3siYnVja2V0IjoiaW1waWMifSxbImNvbnRlbnQtbGVuZ3RoLXJhbmdlIiwwLDEwNDg1NzYwXSxbInN0YXJ0cy13aXRoIiwiJGtleSIsInRlc3QvMjAxNjA5L2VwdGpiLyJdXX0=\",\n  \"signature\": \"soj2pQOIRNcO6QtHY2UqWWsm3AY=\",\n  \"dir\": \"test/201609/eptjb/\",\n  \"expires\": 1474513321480\n}",
          "type": "json"
        }
      ]
    },
    "filename": "routes/misc.js",
    "groupTitle": "Misc"
  },
  {
    "type": "get",
    "url": "/webim/team/:storeId/customer_service",
    "title": "获取店铺所有客服团队",
    "name": "GetCustomerServiceTeams",
    "group": "Team",
    "version": "0.1.0",
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "String",
            "optional": false,
            "field": "storeId",
            "description": "<p>店铺id</p>"
          }
        ]
      }
    },
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "Object[]",
            "optional": false,
            "field": "teams",
            "description": "<p>返回团队列表</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "成功响应:",
          "content": "HTTP/1.1 200 OK\n{\n  \"code\": 200,\n  \"result\": [\n    {\n      \"id\": 2,\n      \"teamName\": \"开思客服\",\n      \"Users\": [\n        {\n          \"id\": \"5R2Bv6W9N\",\n          \"uid\": \"zhangjl\",\n          \"nickname\": \"张建临\",\n          \"contactNumber\": \"18688780069\",\n          \"storeName\": \"开思\",\n          \"storeId\": \"SUPER007\",\n          \"partyGroup\": \"张建临\",\n          \"portraitUri\": \"\",\n          \"displayName\": \"张建临\",\n          \"isMaster\": true    //是否为该团队主管\n        },\n        {\n          \"id\": \"QLRCcmWHf\",\n          \"uid\": \"kscxy\",\n          \"nickname\": \"陈星言\",\n          \"contactNumber\": \"18688780069\",\n          \"storeName\": \"开思\",\n          \"storeId\": \"SUPER007\",\n          \"partyGroup\": \"陈星言\",\n          \"portraitUri\": \"\",\n          \"displayName\": \"陈星言\",\n          \"isMaster\": false\n        }\n      ]\n    }\n  ]\n}",
          "type": "json"
        }
      ]
    },
    "examples": [
      {
        "title": "示例：",
        "content": "GET /webim/team/SUPER007/customer_service",
        "type": "bash"
      }
    ],
    "filename": "routes/team.js",
    "groupTitle": "Team"
  },
  {
    "type": "get",
    "url": "/webim/team/:storeId",
    "title": "获取店铺的所有团队列表",
    "name": "GetTeams",
    "group": "Team",
    "version": "0.1.0",
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "String",
            "optional": false,
            "field": "storeId",
            "description": "<p>店铺id</p>"
          }
        ]
      }
    },
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "Object[]",
            "optional": false,
            "field": "teams",
            "description": "<p>返回团队列表</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "成功响应:",
          "content": "HTTP/1.1 200 OK\n{\n  \"code\": 200,\n  \"result\": [\n    {\n      \"id\": 2,\n      \"teamName\": \"开思客服\",\n      \"Users\": [\n        {\n          \"id\": \"5R2Bv6W9N\",\n          \"uid\": \"zhangjl\",\n          \"nickname\": \"张建临\",\n          \"contactNumber\": \"18688780069\",\n          \"storeName\": \"开思\",\n          \"storeId\": \"SUPER007\",\n          \"partyGroup\": \"张建临\",\n          \"portraitUri\": \"\",\n          \"displayName\": \"张建临\",\n          \"isMaster\": true\n        },\n        {\n          \"id\": \"QLRCcmWHf\",\n          \"uid\": \"kscxy\",\n          \"nickname\": \"陈星言\",\n          \"contactNumber\": \"18688780069\",\n          \"storeName\": \"开思\",\n          \"storeId\": \"SUPER007\",\n          \"partyGroup\": \"陈星言\",\n          \"portraitUri\": \"\",\n          \"displayName\": \"陈星言\",\n          \"isMaster\": false\n        }\n      ]\n    },\n    {\n      \"id\": 3,\n      \"teamName\": \"开思译码\",\n      \"Users\": [\n        {\n          \"id\": \"ME1Gu0U9k\",\n          \"uid\": \"kslwp\",\n          \"nickname\": \"卢卫平\",\n          \"contactNumber\": \"18688780069\",\n          \"storeName\": \"开思\",\n          \"storeId\": \"SUPER007\",\n          \"partyGroup\": \"卢卫平\",\n          \"portraitUri\": \"\",\n          \"displayName\": \"卢卫平\",\n          \"isMaster\": false\n        }\n      ]\n    }\n  ]\n}",
          "type": "json"
        }
      ]
    },
    "examples": [
      {
        "title": "示例：",
        "content": "GET /webim/team/SUPER007",
        "type": "bash"
      }
    ],
    "filename": "routes/team.js",
    "groupTitle": "Team"
  },
  {
    "type": "get",
    "url": "/webim/user/online_status/batch",
    "title": "批量获取用户的在线状态",
    "name": "GetOnlineStatus",
    "group": "User",
    "version": "0.1.0",
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "String[]",
            "optional": false,
            "field": "id",
            "description": "<p>融云用户ID</p>"
          },
          {
            "group": "Parameter",
            "type": "Number",
            "optional": false,
            "field": "expires",
            "description": "<p>过期时间，时间戳，如果在该时间戳之前，会重新从融云获取一次在线状态</p>"
          }
        ]
      }
    },
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "Object[]",
            "optional": false,
            "field": "statues",
            "description": "<p>在线状态列表</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "成功响应:",
          "content": "HTTP/1.1\n{\n  \"code\": 200,\n  \"result\": [\n    {\n      \"userId\": \"ZXEkcNQOm\",\n      \"os\": \"Websocket\",\n      \"timestamp\": 1474508386265,\n      \"status\": 0\n    },\n    {\n      \"userId\": \"7QqpXMtkB\",\n      \"status\": 1,\n      \"os\": \"\",\n      \"timestamp\": 1474508468435\n    }\n  ]\n}",
          "type": "json"
        }
      ]
    },
    "examples": [
      {
        "title": "示例：",
        "content": "GET /webim/user/online_status/batch?id=JLwaUloqv&id=K69DpFSlN",
        "type": "bash"
      }
    ],
    "filename": "routes/user.js",
    "groupTitle": "User"
  },
  {
    "type": "get",
    "url": "/webim/user/get_token",
    "title": "获取融云token",
    "name": "GetToken",
    "group": "User",
    "version": "0.1.0",
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "userId",
            "description": "<p>融云用户ID</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "rcToken",
            "description": "<p>该用户的融云token</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "appKey",
            "description": "<p>融云的appKey</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "成功响应:",
          "content": "HTTP/1.1\n{\n \"code\": 200,\n   \"result\": {\n     \"userId\": \"JLwaUloqv\",\n     \"rcToken\": \"Sccg1H7h8qymwIYgEm9ayWvHCMGVI5hOYod++FnvBpoMeYYQFAvz2OM/YO87GI42iRno/ZMXIHCHCke8CMYTCQ==\",\n     \"appKey\": \"8w7jv4qb77uzy\"\n  }\n}",
          "type": "json"
        }
      ]
    },
    "filename": "routes/user.js",
    "groupTitle": "User"
  },
  {
    "type": "get",
    "url": "/webim/user/:id",
    "title": "指定用户信息",
    "name": "GetUser",
    "group": "User",
    "version": "0.1.0",
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "String",
            "optional": false,
            "field": "id",
            "description": "<p>用户在融云对应的id</p>"
          }
        ]
      }
    },
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "Object",
            "optional": false,
            "field": "user",
            "description": "<p>返回用户信息</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "成功响应:",
          "content": "HTTP/1.1 200 OK\n{\n   \"code\": 200,\n   \"result\": {\n     \"id\": \"7QqpXMtkB\",\n     \"uid\": \"szdlzd\",\n     \"nickname\": \"深圳店-李钟锭\",\n     \"contactNumber\": \"18688780069\",\n     \"storeName\": \"\",\n     \"storeId\": \"\",\n     \"partyGroup\": \"中鑫之宝深圳店\",\n     \"portraitUri\": \"\"\n   }\n }",
          "type": "json"
        }
      ]
    },
    "examples": [
      {
        "title": "示例：",
        "content": "GET /webim/user/ZXEkcNQOm",
        "type": "bash"
      }
    ],
    "filename": "routes/user.js",
    "groupTitle": "User"
  },
  {
    "type": "get",
    "url": "/webim/user/batch",
    "title": "批量获取用户信息",
    "name": "GetUsers",
    "group": "User",
    "version": "0.1.0",
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "String[]",
            "optional": false,
            "field": "id",
            "description": "<p>融云用户ID</p>"
          }
        ]
      }
    },
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "Object[]",
            "optional": false,
            "field": "users",
            "description": "<p>返回对应的用户列表</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "成功响应:",
          "content": "HTTP/1.1 200 OK\n{\n  \"code\": 200,\n  \"result\": [\n    {\n      \"id\": \"K69DpFSlN\",\n      \"uid\": \"hlzyh\",\n      \"nickname\": \"张燕华\",\n      \"contactNumber\": \"18688780069\",\n      \"storeName\": \"华砺汽配旗舰店\",\n      \"storeId\": \"HL000001\",\n      \"partyGroup\": \"张燕华\",\n      \"portraitUri\": \"\"\n    },\n    {\n      \"id\": \"JLwaUloqv\",\n      \"uid\": \"eptjb\",\n      \"nickname\": \"江滨\",\n      \"contactNumber\": \"18688780069\",\n      \"storeName\": \"欧配通官方旗舰店\",\n      \"storeId\": \"OPT00001\",\n      \"partyGroup\": \"江滨\",\n      \"portraitUri\": \"\"\n    }\n  ]\n}",
          "type": "json"
        }
      ]
    },
    "examples": [
      {
        "title": "示例：",
        "content": "GET /webim/user/batch?id=JLwaUloqv&id=K69DpFSlN",
        "type": "bash"
      }
    ],
    "filename": "routes/user.js",
    "groupTitle": "User"
  },
  {
    "type": "get",
    "url": "/webim/user/find",
    "title": "查找用户",
    "name": "GetUsers",
    "group": "User",
    "version": "0.1.0",
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "String",
            "optional": false,
            "field": "kw",
            "description": "<p>关键字（可以为uid,nickname,storeName）</p>"
          }
        ]
      }
    },
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "Object[]",
            "optional": false,
            "field": "users",
            "description": "<p>返回对应的用户列表</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "成功响应:",
          "content": "HTTP/1.1 200 OK\n {\n   \"code\": 200,\n   \"result\": [\n     {\n       \"id\": \"ZXEkcNQOm\",\n       \"uid\": \"zxzbszd\",\n       \"nickname\": \"中鑫之宝深圳店\",\n       \"contactNumber\": \"18688780069\",\n       \"storeName\": \"\",\n       \"storeId\": \"\",\n       \"partyGroup\": \"中鑫之宝深圳店\",\n       \"portraitUri\": \"\"\n     },\n     {\n       \"id\": \"7QqpXMtkB\",\n       \"uid\": \"szdlzd\",\n       \"nickname\": \"深圳店-李钟锭\",\n       \"contactNumber\": \"18688780069\",\n       \"storeName\": \"\",\n       \"storeId\": \"\",\n       \"partyGroup\": \"中鑫之宝深圳店\",\n       \"portraitUri\": \"\"\n     }\n   ]\n }",
          "type": "json"
        }
      ]
    },
    "examples": [
      {
        "title": "示例：",
        "content": "GET /webim/user/find?kw=中鑫之宝深圳",
        "type": "bash"
      }
    ],
    "filename": "routes/user.js",
    "groupTitle": "User"
  },
  {
    "type": "post",
    "url": "/webim/user/login",
    "title": "webim 登录接口",
    "name": "Login",
    "group": "User",
    "version": "0.1.0",
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "String",
            "optional": false,
            "field": "uid",
            "description": "<p>用户id, username</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": false,
            "field": "password",
            "description": "<p>用户密码</p>"
          }
        ]
      }
    },
    "success": {
      "fields": {
        "Success 200": [
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "id",
            "description": "<p>融云用户ID</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "rcToken",
            "description": "<p>该用户的融云token</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "appKey",
            "description": "<p>融云的appKey</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "authToken",
            "description": "<p>用户的签名token</p>"
          },
          {
            "group": "Success 200",
            "type": "String",
            "optional": false,
            "field": "secretCode",
            "description": "<p>用户免登陆进入电商url的加密code</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "成功响应:",
          "content": "HTTP/1.1\n{\n \"code\": 200,\n   \"result\": {\n     \"id\": \"JLwaUloqv\",\n     \"rcToken\": \"Sccg1H7h8qymwIYgEm9ayWvHCMGVI5hOYod++FnvBpoMeYYQFAvz2OM/YO87GI42iRno/ZMXIHCHCke8CMYTCQ==\",\n     \"authToken\": \"8a32060431884399ba6aad847e2c1079\",\n     \"secretCode\": \"$SHA$hSdOrrapa$qr_gwXwELrbfSZfe5JjxF-CYNCg\",\n     \"appKey\": \"8w7jv4qb77uzy\"\n  }\n}",
          "type": "json"
        }
      ]
    },
    "filename": "routes/user.js",
    "groupTitle": "User"
  },
  {
    "type": "get",
    "url": "/webim/user/logout",
    "title": "webim 登出接口",
    "name": "Logout",
    "group": "User",
    "version": "0.1.0",
    "filename": "routes/user.js",
    "groupTitle": "User"
  }
] });
